package com.stark.commons.spring.core.boot.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;

import lombok.Data;

/**
 * MinIO 配置项。
 * @author Ben
 * @since 1.1.0
 * @version 1.0.0
 */
@ConfigurationProperties(prefix = "spring.minio")
@Data
public class MinioProperties {
	
	/**
	 * Request endpoint. Endpoint is an URL, domain name, IPv4 or IPv6 address.<pre>
     *              Valid endpoints:
     *              * https://s3.amazonaws.com
     *              * https://s3.amazonaws.com/
     *              * https://play.minio.io:9000
     *              * http://play.minio.io:9010/
     *              * localhost
     *              * localhost.localdomain
     *              * play.minio.io
     *              * 127.0.0.1
     *              * 192.168.1.60
     *              * ::1</pre>
	 */
	private String endpoint;
	
	/**
	 * Valid port.  It should be in between 1 and 65535.  Unused if endpoint is an URL.
	 */
	private int port = 9000;
	
	/**
	 * Access key to access service in endpoint.
	 */
	private String accessKey;
	
	/**
	 * Secret key to access service in endpoint.
	 */
	private String secretKey;
	
	/**
	 * Region name to access service in endpoint.
	 */
	private String region;
	
	/**
	 * If true, access endpoint using HTTPS else access it using HTTP.
	 */
	private boolean secure;
    
}
